Extension commands

STM32CubeIDE for Visual Studio Code adds STM32-specific commands to the Visual Studio Code interface. These commands are available from the STM32CubeIDE view, the Command Palette, and context-dependent project actions.

Commands use the current workspace context. If several projects are open, select the intended project context before starting a command.

Many commands guide the user through prompts. The prompts can depend on the project state, installed bundles, available toolchains, connected debug probes, and files present in the workspace.

Command access points

Use these access points for STM32CubeIDE commands:

  • The STM32CubeIDE icon in the Activity Bar

  • The STM32Cube key actions section

  • The Command Palette

  • Project-specific buttons and prompts shown by the extension

The STM32CubeIDE view provides the most direct access to project creation, import, discovery, build, and board-related actions. The Command Palette is useful when the command name is known or when the editor focus is outside the STM32CubeIDE view.

Use the STM32CubeIDE view for guided workflows that require several choices. Use the Command Palette for quick access to a known action, or when documenting a repeatable action for a team.

Common command groups

STM32CubeIDE commands usually belong to one of these groups:

  • Project creation and import

  • Project discovery and setup

  • Build and configuration selection

  • Debug probe and board management

  • Toolchain, bundle, and support actions

Each command can require a different project state. For example, project discovery requires a valid project folder, while build commands require a configured CMake preset and a selected build target.

If a command is not available, first check the workspace context and project state. A missing preset, unopened project root folder, or incomplete project discovery step can prevent the extension from showing an action.

Project discovery

Use project discovery when an STM32 project exists in the workspace but the extension has not configured it for the current Visual Studio Code session.

Discovery is commonly needed after opening a project generated outside Visual Studio Code, importing an existing folder, or receiving a project from source control. The operation associates the folder with the STM32CubeIDE for Visual Studio Code workflow.

To discover a project:

  1. Open the project root folder in Visual Studio Code.

  2. Select the STM32CubeIDE icon in the Activity Bar.

  3. Select Discover STM32Cube project.

  4. Select the device or board, toolchain, and project target when requested.

  5. Save the setup when the extension shows the final configuration.

After discovery, select the required CMake preset and run the configure step before building.

If the project contains several buildable targets, verify the target that appears in the CMake view after discovery. The selected target controls which executable file the build produces and which binary the debug configuration can use.

Command Palette use

Use the Command Palette when a command is not visible in the current view.

To run a command from the Command Palette:

  1. Press Ctrl+Shift+P.

  2. Type the STM32CubeIDE command name or a related keyword.

  3. Select the command from the list.

  4. Complete the prompts shown by Visual Studio Code.

If the command affects a project, confirm the active project context before accepting the final prompt.

Command Palette entries can look similar when several STM32-related extensions are installed. Prefer commands that clearly belong to STM32CubeIDE for Visual Studio Code when following this guide.

Command results

Commands can create files, modify configuration, start background tools, or display status messages. Review the Output, Terminal, and Problems panels after running a command that changes the project.

For project-changing commands, inspect the source-control view before committing. This review helps separate intended generated changes from local settings or temporary files.